package com.cxb.springboot.controller;

import com.cxb.springboot.service.CuratorLockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Classname CuratorController
 * @Description TODO
 * @Date 2023/3/28 22:43
 * @Created by Administrator
 */
@RequestMapping("/curator")
@RestController
public class CuratorController {

    @Autowired
    private CuratorLockService curatorLockService;

    /**
     * localhost:8081/curator/deduct?lockId=1001
     * @param lockId
     * @return
     */
    @RequestMapping("/deduct")
    public String deduct(String lockId) {
        return curatorLockService.inventoryDeduct(lockId);
    }

}

